#include "Quimera_protocol_v1.cpp"

int main(int argc, char **argv){
    
    unsigned char domain;
    unsigned short f_time;
    Q_pool pool;
    Q_density q_dent;
    void *v;
    pthread_t thd;
    bzero((char *) &pool, sizeof(pool));
    bzero((char *) &q_dent, sizeof(q_dent));
    
    domain=unsigned(char(atoi(argv[2])));
    f_time=unsigned(short(atoi(argv[3])));
    pool.first=unsigned(atoi(argv[4]));
    pool.last=unsigned(atoi(argv[5]));
    q_dent.cycle=unsigned(short(atoi(argv[6])));
    q_dent.switchpop=unsigned(short(atoi(argv[7])));
    
    Quimera_server Q_S(domain,pool,f_time,q_dent);
    
    if(Q_S.quality_control)
        return(Q_S.Listen());
    
    return (EXIT_FAILURE);
}
